home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 7
/
FM Towns Free Software Collection 7.iso
/
data
/
nyan_e2
/
nyane2_u.plp
< prev
next >
Wrap
Text File
|
1993-11-30
|
6KB
|
246 lines
/******** フォーラム, HP , メールに, メッセージをアップする v1.04a用 ********/
%UpText{
%UpOne{
%UpTitle{getchar(IndexLine,32,80)};
%UpBody{
%fno @head(@getchar(IndexLine,4,3),{ });
send( FNameTop|{MES}|fno|{.TXT});
type({\n/POST\n});
loop({
wait(60,{TimeOut},
{題名 (漢字で20文字まで)\n:}
,{type(@UpTitle);
im({Yes})},
{宛先 (IDか同報グループ名又は FAX番号 改行で終了)\n:}
,{type(@getchar(IndexLine,14,8)|{\n});
wait(30,{TimeOut},{\n:});
type({\n});
im({Yes})},
{宛先 (例 abc@cc.xyz.ac.jp 改行で終了)\n:}
,{type(@UpTitle);
wait(30,{TimeOut},{\n:});
type({\n});
im({Yes})},
{(1:OK 2:NG)\n:}
,{type({1\n});im({Yes})},
{◆登録されていません◆}
,{wait(30,{TimeOut},{\n:});
type({\n});
im({No})},
{処理)\n>} ,{type({\n});im({Yes})},
{\n-送信完了-}
,{cond:={了}; im({No})},
{\n-登録完了-}
,{cond:={了}; im({No})},
{\n修正 (1:修正する 2:しない)\n:}
,{type({2\n});im({Yes})},
{\n登録 (1:登録する 2:しない)\n:}
,{type({1\n});
cond:={了};
im({No})}
)
});
};
%UpForum{
var flag[4];
%ResNum @getchar(IndexLine,26,5);
%ReqForum @getchar(IndexLine,14,8);
%ReqMes @getchar(IndexLine,23,2);
%ReqDest @getchar(IndexLine,26,3);
%UpBUL{
test(,{ type({BUL\n});
wait(30,{TimeOut},{\nBBS>});
},{\nBBS>},{
});
%time @getchar(@daylong,16,5)|{ };
type({COM}|{\n});
wait(30,{TimeOut},{で/E) \n});
type({SUB:}|time|@UpTitle);
UpBody;
wait(130,{TimeOut},{\nBBS>});
case(cond,{了},{cond:={済}});
};
%upccs1{
case(FMesNO<>ReqMes,
{Yes},{ case(FMesNO<>{},{Yes},{
type({RX }|ReqMes|{\n});
FMesNO:=ReqMes;
wait(30,{TimeOut},{\nCCS(N)>},,
{\nCCS(P)>});
});
});
};
%upccs2{
%Say {
type({SAY\n});
wait(30,{TimeOut},{\n:},{type({1\n})},
{\n-登録個数が});
};
case( ResNum ,
{ },{ Say;
},,{ type({RE }|ResNum|{\n});
});
loop({
wait(30,{TimeOut},
{/E)\n},{
im({No});
},{発言はありません◆\n},{
Say; im({Yes});
},{登録出来ません-\n},{
flag:={No}; im({No});
});
});
case(flag,
{Yes},{ type({SUB:}|@UpTitle);
UpBody;
case(cond,{了},{cond:={済}});
},{No},{cond:={保};
});
wait(150,{TimeOut},{\nCCS(N)>},,{\nCCS(P)>});
};
%UpCCS{
flag:={Yes};
test(,{
type({MES }|ReqMes|{\n});
Where3:={MES};
FMesNO:=ReqMes;
wait(30,{TimeOut},{\nCCS(N)>},,{\nCCS(P)>});
},{\nCCS(N)>},{ upccs1;
},{\nCCS(P)>},{ upccs1;
});
test(,,{\nCCS(N)>},{upccs2},{\nCCS(P)>},{upccs2});
};
case(Where1<>{FORUM} || Where2<>ReqForum,
{Yes},{ %ForumDir logd|{\}|@head(ReqForum,{ });
GoForum(ReqForum);
});
case(ReqDest={BUL},
{Yes}, { UpBUL;
},{No},{ UpCCS;
});
};
%UpHP{
var HPData[30];
%name @head(@getchar(IndexLine,14,8),{ });
HPData:=@tail(@body(hp,,{/}|name|{,}),{,});
case(HPData={},{Yes},{
HPData:=@tail(@body(hp,,{/}|name),{,});});
%HPID @head(HPData,{/});
%HPPass @body(HPData,{/});
case(HPID<>{},
{Yes},{
case(Where1={HP} && Where2=HPID,{No},{
GoHPpatio({HP},HPID,HPPass);
});
test(,,{\nHP>},{
type({WRITE\n});
wait(30,{TimeOut},{\n:});
type(@UpTitle);
wait(30,{TimeOut},{\n:});
type({1\n});
wait(30,{TimeOut},{/E)\n});
UpBody;
wait(130,{TimeOut},{\nHP>});
case(cond,{了},{cond:={済}});
});
},{No},{cond:={予};
});
};
%UpMail{[Attr]
var Add[5];
case(Attr,{VAN},{Add:={PCV>}},,{Add:={}});
%UpMail2{
wait(30,{TimeOut},{/E)\n});
type({SUB:}|@UpTitle);
type({TO:}|Add|@getchar(IndexLine,14,8)|{\n});
case(@body(Handle,{,})={} && @tail(Handle,{/})<>{}
&& @body(Handle,,{/})={},{Yes},{
type({FROM:}|@tail(Handle,{/})|{\n});
});
wait(30,{TimeOut},{\n});
UpBody;
};
case(Smail={},
{Yes}, {case(Where1<>{MAIL},{Yes},{GoMail});
},{No},{case(Where1<>{FORUM} || Where2<>Smail,{Yes},{
%ForumDir logd|{\}|@head(Smail,{ });
GoForum(Smail);
});
});
test(,,{\nMAIL>},{
type({COM\n});
UpMail2;
wait(60,{TimeOut},{\nMAIL>});
case(cond,{了},{cond:={済}});
},{\nFORUM>},{
type({SMAIL\n});
UpMail2;
wait(60,{TimeOut},{\nFORUM>});
case(cond,{了},{cond:={済}});
});
};
/********** Main Routine **********/
var cond[2];
%WriteIndex{
write(SaveFName,IndexLine);
im({Yes});
};
delfile(SaveFName);
fopen(IndexFName);
loop({ IndexLine:=@fread;
case(@getchar(IndexLine,1,2),
{予},{ %fno @head(@getchar(IndexLine,4,3),{ });
cond:={誤};
case(@filechk(FNameTop|{MES}|fno|{.TXT}),
{Yes},{ case(@getchar(IndexLine,8,5),
{Forum},{UpForum;
},{HP },{UpHP;
},{Mail },{UpMail({NIF});
},{PCVAN},{UpMail({VAN});
},{BMail},{cond:={予}; next:={Yes};
},{MyPrf},{cond:={予}; next:={Yes};
},{Patio},{cond:={予}; next:={Yes};
},{FAX },{cond:={予}; next:={Yes};
},{WPNC },{cond:={予}; next:={Yes};
},{Read },{cond:={予};
},,{display({Invelid Dest. dest:}|
@getchar(IndexLine,8,5)|{.\n});
});
IndexLine:=cond|
@getchar(IndexLine,3,80);
WriteIndex;
},{No},{
case(@getchar(IndexLine,8,5)={LIB } ||
@getchar(IndexLine,8,5)={Prof } ||
@getchar(IndexLine,8,5)={List } ||
@getchar(IndexLine,8,5)={RTN } ||
@getchar(IndexLine,8,5)={NEW },
{Yes},{WriteIndex;
},{No},{
display({UpFile not found. No.:}|
fno|{.\n});
WriteIndex;
});
});
},{説},{WriteIndex;
},{保},{WriteIndex;
},{覧},{WriteIndex;
},{済},{WriteIndex;
},{誤},{WriteIndex;
}, ,{im({No})
});
});
fclose;
copyfile(SaveFName,IndexFName);
};
footnote({ 文書のアップ処理をしています});
code({sjis});
case(@filechk(IndexFName),{Yes},{UpOne});
};
next:={No};
UpText;